Add allow_ddm_traffic to port config in CRDB - #11117
Merged
Merged
Conversation
andrewjstone
requested review from
internet-diglett,
jgallagher,
sunshowers and
taspelund
and removed request for
sunshowers
August 20, 2026 05:12
andrewjstone
commented
Aug 20, 2026
| match self | ||
| .db_datastore | ||
| .switch_port_settings_create(opctx, &port_settings_params, None) | ||
| .switch_port_settings_create( |
Contributor
Author
There was a problem hiding this comment.
This is where the value from RSS is actually stored in the DB.
For multirack testing we need to be able to enable DDM traffic on a front port. We only want to expose this configuraton via RSS now, as the vast majority of multirack is not ready and we only want to do internal testing. We want to leave the external API untouched right now. However, the `sync_switch_configuration` background task will immediately overwrite the value set in RSS, if we always hard code it to the default of false. Therefore, we had to add code to plumb the value into CRDB from RSS and apply it during the `sync_switch_configuration` background task. Thanks to @jgallagher for [pointing this out earlier](#11091 (comment)).
andrewjstone
force-pushed
the
multirack-join-service-part-3.5
branch
from
August 20, 2026 15:19
a323dbe to
115f4df
Compare
jgallagher
approved these changes
Aug 20, 2026
jgallagher
left a comment
Contributor
There was a problem hiding this comment.
LGTM, just one nit on the schema and a question about the API
| port_settings_id UUID PRIMARY KEY, | ||
| geometry omicron.public.switch_port_geometry | ||
| geometry omicron.public.switch_port_geometry, | ||
| allow_ddm_traffic BOOL NOT NULL DEFAULT false |
Contributor
There was a problem hiding this comment.
Can we remove the DEFAULT false? Every insert should provide a value here.
Contributor
There was a problem hiding this comment.
Yeah we generally set a default and then remove it in the next DDL in the migration.
Contributor
Author
There was a problem hiding this comment.
Wait, I messed this up. I need to account for the migration. Thanks @sunshowers. I'll fix it.
sunshowers
approved these changes
Aug 20, 2026
| port_settings_id UUID PRIMARY KEY, | ||
| geometry omicron.public.switch_port_geometry | ||
| geometry omicron.public.switch_port_geometry, | ||
| allow_ddm_traffic BOOL NOT NULL DEFAULT false |
Contributor
There was a problem hiding this comment.
Yeah we generally set a default and then remove it in the next DDL in the migration.
andrewjstone
enabled auto-merge (squash)
August 20, 2026 17:01
andrewjstone
disabled auto-merge
August 20, 2026 17:04
andrewjstone
enabled auto-merge (squash)
August 20, 2026 17:15
andrewjstone
disabled auto-merge
August 20, 2026 17:16
andrewjstone
enabled auto-merge (squash)
August 20, 2026 17:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For multirack testing we need to be able to enable DDM traffic on a front port. We only want to expose this configuraton via RSS now, as the vast majority of multirack is not ready and we only want to do internal testing. We want to leave the external API untouched right now.
However, the
sync_switch_configurationbackground task will immediately overwrite the value set in RSS, if we always hard code it to the default of false. Therefore, we had to add code to plumb the value into CRDB from RSS and apply it during thesync_switch_configurationbackground task.Thanks to @jgallagher for pointing this out earlier.